package com.yanghui.dtracing.core.log;

public class NoopLog implements ILog {

	@Override
	public void info(String message, Object... arguments) {
		StringBuilder sb = new StringBuilder();
		if(null != message && !"".equals(message)) {
			sb.append(message);
		}
		if(arguments != null) {
			for(Object object : arguments) {
				sb.append(object);
			}
		}
		System.out.println(sb.toString());
	}

	@Override
	public void error(String message, Object... arguments) {
		System.err.println(message);
	}

	@Override
	public void warn(String format, Object... arguments) {
		System.err.println(format);
	}

	@Override
	public boolean isDebugEnable() {
		return false;
	}

	@Override
	public void debug(String message, Throwable t) {
		System.out.println(message);
		if(t != null){
			t.printStackTrace();
		}
	}

	@Override
	public void debug(String message, Object... arguments) {
		this.info(message,arguments);
	}

	@Override
	public void error(String message, Throwable t) {
		System.err.println(message);
		if(t != null) {
			t.printStackTrace();
		}
	}
}
